package com.jack.base.desiginmodel.observer;

/**
 * Created by zhang_j on 2019/12/23
 */
public class HexObserver extends Observer{

    HexObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    void update() {
        System.out.println("Hex String:"+ Integer.toHexString(subject.getState()));
    }
}
